package com.reptile.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.reptile.entity.YsNews;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 新闻mapper
 * @author songyafei
 */
@Mapper
public interface YsNewsMapper extends BaseMapper<YsNews> {

    /**
     * 查询新闻重复数据
     *
     * @return
     */
    @Select("SELECT ID FROM  DB_NEWS GROUP BY URL HAVING COUNT(URL)>1")
    List<Long> queryRepeatData();
}
